From: Florian Müllner Date: Thu, 10 Feb 2011 15:30:28 +0000 (+0100) Subject: base-icon: Enforce the requested icon size X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8849 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a78e75775d20bd626ec0ee8670c925ed62d8149c;p=gnome-shell.git base-icon: Enforce the requested icon size Mainly due to StTextureCache's way of handling fallback icons, an implementation of BaseIcon.createIcon() may return an icon smaller than the requested size. Given that BaseIcon is not used for isolated elements, but rather for groups of related items (App view, Dash, Search Results, ...), having some elements end up with the wrong size is more annoying than having some elements end up ugly due to scaling, so explicitly enforce the requested icon size. https://bugzilla.gnome.org/show_bug.cgi?id=642043 --- diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index 91cc0c3f4..f2d046cb2 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -126,6 +126,12 @@ BaseIcon.prototype = { this.icon.destroy(); this.iconSize = size; this.icon = this.createIcon(this.iconSize); + + // The icon returned by createIcon() might actually be smaller than + // the requested icon size (for instance StTextureCache does this + // for fallback icons), so set the size explicitly. + this.icon.set_size(this.iconSize, this.iconSize); + this._iconBin.child = this.icon; },